package com.haibara.codesubmiteval.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.haibara.codesubmiteval.model.dto.questionSubmit.QuestionSubmitAddRequest;
import com.haibara.codesubmiteval.model.dto.questionSubmit.QuestionSubmitQueryRequest;
import com.haibara.codesubmiteval.model.dto.questionSubmit.QuestionSubmitUpdateRequest;
import com.haibara.codesubmiteval.model.dto.questionSubmit.QuestionSubmitVOQueryRequest;
import com.haibara.codesubmiteval.model.entity.QuestionSubmit;
import com.haibara.codesubmiteval.model.vo.Least5TimeSubmitVO;
import com.haibara.codesubmiteval.model.vo.QuestionSubmitVO;

import java.util.List;

/**
 * @Author: mengyu
 * @Date: 2025/2/6
 */
public interface QuestionSubmitService extends IService<QuestionSubmit> {
    Page<QuestionSubmitVO> pageQuestionSubmitVO(QuestionSubmitVOQueryRequest questionSubmitVOQueryRequest);

    Page<QuestionSubmit> pageQuestionSubmit(QuestionSubmitQueryRequest questionSubmitQueryRequest);

    Long doSubmit(QuestionSubmitAddRequest questionSubmitAddRequest);

    QuestionSubmitVO getQuestionSubmitVOById(Long id);

    String getHistoryCode(Long userId, Long questionId);

    List<Least5TimeSubmitVO> getLeast5TimesSubmit(Long userId);

    void updateQuestionSubmit(QuestionSubmitUpdateRequest questionSubmitUpdateRequest);
}
